import Api from '@/api/client/tiers'
import i18n from "@/lang/index";
const contentConfig = {
  pageName: "sys:user",
  table: {
    border: true,
    highlightCurrentRow: false,
  },
  indexAction: (data) => {
    console.log("index", data);
    return new Promise((resolve, reject) => {
      Api.getList(data).then(s => {
        console.log(s);
        resolve(s)
      }).catch(e => {
        console.log(e);
        reject(e)
      })
    });
  },
  deleteAction: function (id) {
    console.log("delete", id);
    return new Promise((resolve, reject) => {
      resolve({
        code: "00000",
        data: null,
        msg: i18n.global.t("hint.7"),
      })

    });
  },
  exportAction: function (queryParams) {
    // 导出Excel文件
    // return exportUser(queryParams);
  },
  pk: "id",
  toolbar: [
    "refresh",
    // "add",
    // "delete",
    // "export",
    // {
    //   name: "import",
    //   icon: "upload",
    //   text: "导入",
    //   auth: "import",
    // },
  ],
  cols: [
    { label: "ID", align: "center", prop: "id", width: 100,fixed: "left" },
    { label: i18n.global.t("label.68"), align: "center", prop: "title",fixed: "left" },
    { label: i18n.global.t("label.67"), align: "center", prop: "deposit_amount" },
    { label: i18n.global.t("label.69"), align: "center", prop: "deposit_count", },
    { label: i18n.global.t("label.70"), align: "center", prop: "description" },
    { label: i18n.global.t("label.71"), align: "center", prop: "total_users" },
  ],
};

export default contentConfig;
